public class Test09 {
    public static void main(String[] args) {
        try {
            /*int arr=null;
            int max=getMax(arr);*/
//            System.out.println(max);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        System.out.println("看看我执行了吗");
    }
    public static int getMax(int[] arr){
        if(arr==null){
            throw new NullPointerException();
        }
        if(arr.length==0){
            throw new ArrayIndexOutOfBoundsException();
        }
        int max=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]>max){
                max=arr[i];
            }

        }
        return max;
    }
}
